% A PASCAL LIKE ALGORITHMIC STYLE -- Released 27 APR 2005
%    for LaTeX version 2e
%
% Copyright Szasz Janos
% E-mail szaszjanos@sourceforge.net
%
\NeedsTeXFormat{LaTeX2e}%
\ProvidesPackage{algpascal}%
\RequirePackage{ifthen}%
\RequirePackage{algorithmicx}%
\typeout{Document Style - pascal environments for the `algorithmicx' style}%
%
\ProcessOptions%
%
%
%      ***      DECLARATIONS      ***
%
%
\algnewlanguage{pascal}%
\alglanguage{pascal}%
%
%      ***      KEYWORDS      ***
%
\algnewcommand\textkeyword{\textbf}%
%
%      ***      DECLARED BLOCKS AND LOOPS      ***
%
\algdef{SEi}{Begin}{End}{0cm}{\textkeyword{begin}}{\textkeyword{end}}%
\algdef{Sei}{Asm}{End}{0cm}{\textkeyword{asm}}%
%
\algdef{lS}{For}[2]{\textkeyword{for} \(#1\) \textkeyword{to} \(#2\) \textkeyword{do}}%
\algdef{lS}{While}[1]{\textkeyword{while} \(#1\) \textkeyword{do}}%
\algdef{lS}{With}[1]{\textkeyword{with}\ \(#1\) \textkeyword{do}}%
\algdef{SE}{Repeat}{Until}{\textkeyword{repeat}}[1]{\textkeyword{until}\ \(#1\)}%
\algdef{lS}{If}[1]{\textkeyword{if}\ \(#1\) \textkeyword{then}}%
\algdef{lC}{If}{Else}{\textkeyword{else}}%
%
%      ***      OTHER DECLARATIONS      ***
%
\algnewcommand\Procedure{\State\textkeyword{procedure}\space}%
\algnewcommand\Function{\State\textkeyword{function}\space}%
%
\algrenewcomment[1]{\hfill\{#1\}}%
%
